﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RedDragon.Common.Dtos
{
    public class PurchaseOutsourcesDto
    {
        /// <summary>
        /// 序号
        /// </summary>
        public int PurchaseId { get; set; }

        /// <summary>
        /// 订单编码
        /// </summary>
        public string PurchaseNumber { get; set; }

        /// <summary>
        /// 订单名称
        /// </summary>
        public string PurchaseName { get; set; }

        /// <summary>
        /// 订单类型(外键)
        /// </summary>
        public int PurchaseTypeId { get; set; }

        /// <summary>
        /// 所属项目(外键)
        /// </summary>
        public int AffiliatedProjectId { get; set; }

        /// <summary>
        /// 协议编码
        /// </summary>
        public string ProtocolCoding { get; set; }

        /// <summary>
        /// 协议名称
        /// </summary>
        public string ProtocolName { get; set; }

        /// <summary>
        /// 订单备注
        /// </summary>
        public string PurchaseNote { get; set; }

        /// <summary>
        /// 供应商(外键)
        /// </summary>
        public int SupplierId { get; set; }

        /// <summary>
        /// 币种(外键)
        /// </summary>
        public int CurrencyId { get; set; }

        /// <summary>
        /// 预付款金额
        /// </summary>
        public decimal PaymentAmount { get; set; }

        /// <summary>
        /// 订单开始时间
        /// </summary>
        public DateTime? StartTime { get; set; }

        /// <summary>
        /// 订单结束时间
        /// </summary>
        public DateTime? EndTime { get; set; }

        /// <summary>
        /// 签订时间
        /// </summary>
        public DateTime? TheDateOfSigning { get; set; }

        /// <summary>
        /// 状态 1-新建 2-确认
        /// </summary>
        public int PurchaseStatus { get; set; }

        /// <summary>
        /// 计税类型
        /// </summary>
        public string TaxType { get; set; }

        /// <summary>
        /// 税率
        /// </summary>
        public decimal TaxRate { get; set; }

        /// <summary>
        /// 制单人
        /// </summary>
        public string PreparedBy { get; set; }

        /// <summary>
        /// 制单部门(外键)
        /// </summary>
        public int DepartmentId { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        public string? CreatedOwner { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreatedTime { get; set; }

        /// <summary>
        /// 修改人
        /// </summary>
        public string? UpdateOwner { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime? UpdateTime { get; set; }

        /// <summary>
        /// 审核人
        /// </summary>
        public string? ExamineOwner { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime? ExamineTime { get; set; }

        /// <summary>
        /// 审批状态
        /// </summary>
        public int ApprovalStatus { get; set; }

        /// <summary>
        /// 所属项目名称
        /// </summary>
        public string AffiliatedProjectName { get; set; }

        /// <summary>
        /// 订单类型名称
        /// </summary>
        public string PurchaseTypeName { get; set; }

        /// <summary>
        /// 币种名称
        /// </summary>
        public string CurrencyName { get; set; }

        /// <summary>
        /// 供应商名称
        /// </summary>
        public string SupplierName { get; set; }

        /// <summary>
        /// 节点名称（部门）
        /// </summary>
        public string DepartmentName { get; set; }
    }


    public class OrderBankDto
    {
        /// <summary>
        /// 行号
        /// </summary>
        public int OrderBankId { get; set; }
        /// <summary>
        /// 物料管理ID(外键)
        /// </summary>
        public int MaterialId { get; set; }

        /// <summary>
        /// 单价
        /// </summary>
        public decimal Unitprice { get; set; }

        /// <summary>
        /// 数量
        /// </summary>
        public int Quantity { get; set; }

        /// <summary>
        /// 单位(外键)
        /// </summary>
        public int UnitId { get; set; }

        /// <summary>
        /// 行金额 
        /// </summary>
        public decimal BankAmount { get; set; }

        /// <summary>
        /// 行摘要
        /// </summary>
        public string Abstract { get; set; }

        /// <summary>
        /// 订单编码(外键 采购/委外)
        /// </summary>
        public string PurchaseNumber { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        public string? CreatedOwner { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreatedTime { get; set; }

        /// <summary>
        /// 修改人
        /// </summary>
        public string? UpdateOwner { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime? UpdateTime { get; set; }

        /// <summary>
        /// 审核人
        /// </summary>
        public string? ExamineOwner { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime? ExamineTime { get; set; }

        /// <summary>
        /// 物料编码
        /// </summary>
        public string? MaterialCode { get; set; }

        /// <summary>
        /// 物料名称
        /// </summary>
        public string? MaterialName { get; set; }

        /// <summary>
        /// 单位名称
        /// </summary>
        public string UnitName { get; set; }
    }
}
